﻿package appLoader.dictionaries {
	
	
	import flash.display.MovieClip;
	
	public class DictionaryMovieClips {
		
		private var _arrClips:Array;
		private var _currentLanguage:String;
		
		public function DictionaryMovieClips() {
			this._arrClips = new Array();
			this._currentLanguage = "en-us"; // default: ingles
		}
		
		public function insertClip(mc:MovieClip):void {
			this._arrClips.push(mc);
		}
		
		public function changeTo(lang:String):void {
			if (lang) this._currentLanguage = lang;
			for (var i:int = 0; i < this._arrClips.length; i++) {
				var mc:MovieClip = MovieClip(this._arrClips[i]);
				mc.gotoAndStop(this._currentLanguage);
			}
		}
		
		public function get currentLanguage():String { return _currentLanguage; }
		public function set currentLanguage(value:String):void {
			if (value) this._currentLanguage = value;
		}
		
	}
	
}